<?php $_product = $this->getProduct(); ?>
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
<?php if(Mage::getStoreConfig('ajaxcart/addtolinks/enableproduct')): ?>
	<ul class="add-to-links">
	<?php if ($this->helper('wishlist')->isAllow()) : ?>
		<li><a href="#" onclick="ajaxWishlist(this,'<?php echo $_wishlistSubmitUrl ?>','<?php echo $_product->getId()?>'); return false;" class="link-wishlist"><i class="icon-wishlist"></i></a></li>
	<?php endif; ?>
	<?php
		$_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
	?>
	<?php if($_compareUrl) : ?>
		<li><a href="#" onclick="ajaxCompare(this,'<?php echo $_compareUrl?>','<?php echo $_product->getId()?>'); return false;" class="link-compare"><i class="icon-compare"></i></a></li>
	<?php endif; ?>    
	</ul>
<?php else : ?>
	<ul class="add-to-links">
    <?php if ($this->helper('wishlist')->isAllow()) : ?>
        <li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><i class="icon-wishlist"></i></a></li>
    <?php endif; ?>
    <?php
        $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
    ?>
    <?php if($_compareUrl) : ?>
        <li><a href="<?php echo $_compareUrl ?>" class="link-compare"><i class="icon-compare"></i></a></li>
    <?php endif; ?>
    </ul>
<?php endif;?>	